package com.hm.prac;

import java.util.ArrayList;
import java.util.Scanner;

public class PayrollSystem {
    public static void main(String[] args) {
        ArrayList<Employee> list = new ArrayList<>();
        list.add(new SalariedEmployee(new MyDate(2002,12,12),1001,"李华",4000));
        list.add(new HourlyEmployee(new MyDate(1999,12,8),1002,"紫霞",100,160));
        Scanner sc = new Scanner(System.in);
        int month = sc.nextInt();
        for (Employee employee : list) {
            if(employee.getBirthday().getMonth()==month){
                System.out.println("生日快乐");
                System.out.print(employee);
                System.out.println(employee.earnings());
            }
        }

    }
}
